package com.java2104.controller;

import com.java2104.entity.RCUser;
import com.java2104.service.RCUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/user")
public class RCUserController {
    @Autowired
    private RCUserService rcUserService;
    @RequestMapping("/index")
    public String index(){
        return "user/index";
    }
    @RequestMapping("/list")
    @ResponseBody
    public List<RCUser> list(){
        return rcUserService.getList();
    }
}
